﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinFu.IoC.Configuration;

namespace CoreEx.ServiceModel.Tests
{
    [Implements(typeof(IUriProvider))]
    public class SampleUriProvider : IUriProvider
    {
        /// <summary>
        /// Creates a new <see cref="Uri"/> that represents
        /// the service endpoint for the <param name="serviceType"/>.
        /// </summary>
        /// <param name="serviceType">The service type for which to return an <see cref="Uri"/></param>
        /// <returns><see cref="Uri"/></returns>
        public Uri CreateUri(Type serviceType)
        {            
            return new Uri(string.Format("http://localhost:6000/{0}.svc",serviceType.FullName));
        }

        public Uri CreateUri(Type serviceType, string serviceName)
        {
            return CreateUri(serviceType);
        }
    }
}
